import request from "@/utils/request";

// 新增用户
export function saveUser(data) {
    return request({
        url: "/register",
        method: 'post',
        data: data
    })
}

// 修改用户
export function editUser(data) {
    return request({
        url: "/user/edit",
        method: 'post',
        data: data
    })
}

// 删除用户
export function deleteUser(userId) {
    return request({
        url: "/user/delete",
        method: 'post',
        data: userId
    })
}

// 用户数据分页
export function page(pageNum, pageSize, params) {
    const data = {
        pageNum,
        pageSize,
        params
    }
    return request({
        url: "/user/page",
        method: 'post',
        data: data
    })
}
